package com.lwq.designpattern.creationalPatterns.singletonPattern;

/**
 * @ClassName
 * @Description 饿汉式 单例模式
 * @Author liwq
 * @Date 2021/4/25 13:47
 * @Version 1.0
 */
public class SingletonHungry {

    private static SingletonHungry singletonHungry = new SingletonHungry();

    private SingletonHungry() {
    }

    ;

    public static SingletonHungry getInstance() {
        return singletonHungry;
    }

    public void showMessage() {
        System.out.println("创建型模式-单例模式-饿汉模式");
    }

}
